<!DOCTYPE html>
@extends('layouts.master3')
@section('content')
<body>

<div class="container">
<div class="row">
<div class="col-md-2"></div>
<div class="col-md-8">
  <h2>千里码最帅coder排行榜</h2>
 <form role="form" method="POST" action="/train/handsomerank">
                        {!! csrf_field() !!}
			<div class="row">
			<div class="col-md-6">
			<textarea class="form-control" rows="1" name="user"></textarea>
			</div>
			<div class="col-md-6">
                        <button type="submit" class="btn btn-primary">添加候选人</button>
			</div>
			</div>
                    </form>

<hr>

  <table class="table table-responsive" width="450">
    <thead>
      <tr>
        <th>rank</th>
        <th>姓名</th>
        <th>帅气指数</th>
        <th>投他一票</th>
      </tr>
    </thead>
    <tbody>
<?php
$cnt=0;
foreach($userlist as $u)
{
$cnt++;
?>
      <tr <?php if(Auth::check()&&$u->username==Auth::user()->name)echo 'class="success"';?>>
        <td>{{$cnt}}</td>
        <td>{{$u->username}}</td>
        <td>{{$u->cnt}}</td>
        <td>

 <form role="form" method="GET" action="/train/handsomerank">
 {!! csrf_field() !!}
 <div class="row">
<div class="col-md-6">
<textarea class="hidden" rows="1" name="user">{{$u->username}}</textarea>
<input class="form-control" rows="1" name="checkcode" placeholder="请输入验证码"></input>
</div>
<div class+"col-md-6">
<button type="submit" class="btn">赞一下</button>
</div>
</div>
</form>
</td>
      </tr>
<?Php
}
?>
    </tbody>
  </table>
</div>
<div class="col-md-2"></div>
</div>
</div>

</body>
@stop
